/*

Author   : chaos

FileName : arr_2d2.cpp

Date     : 08/08/17 09:58:27

*/
#include <iostream>
using namespace std;

int main(void)
{
    int array[3][4] = {{1,2,3,4},{5,6,7,8},{9,10,11,12}};

    cout << "array address:" << endl;
    for (int i = 0; i < 3; i++) {
        cout << "array["<<i<<"]=" << array[i];

        cout <<"\t*(array+"<<i <<")="<<*(array+i) << endl << endl;

        for (int j = 0; j < 4; j++) {
            cout <<"&array[" << i <<"][" << j <<"]=" <<&array[i][j];

            cout << "\t*(array+" <<i << ")+"<< j << "=" <<*(array+i)+j << endl;
        }
    }
    return 0;
}
